"use strict";
cc._RF.push(module, '75694Efs55NW6Zdncg34Hi+', 'gameEnd');
// script/index/gameEnd.js

"use strict";

cc.Class({
  "extends": cc.Component,
  properties: {
    exitPrefab: {
      "default": null,
      type: cc.Prefab
    }
  },
  start: function start() {
    this.initExitPre();
  },
  onClickstartGame: function onClickstartGame() {
    cc.director.loadScene("start");
    this.node.destroy();
  },
  initExitPre: function initExitPre() {
    if (this.exitPrefab === null) {
      return;
    }

    this.exitNode = cc.instantiate(this.exitPrefab);
    var pos = this.exitNode.position.x;
    pos = -1100;
    this.exitNode.setPosition(pos);
    this.node.addChild(this.exitNode); //console.log(this.exitNode);

    this.exitNode.active = false;
    this.playAnim();
  },
  playAnim: function playAnim() {
    var _this = this;

    this.exitNode.active = true;
    this.scheduleOnce(function () {
      _this.exitAnim = _this.exitNode.getComponent(cc.Animation);

      _this.exitAnim.play('exit');
    }, 0.5);
  }
});

cc._RF.pop();